package cn.com.twoke.easyproject.common.response;


import lombok.RequiredArgsConstructor;
import org.springframework.http.HttpStatus;

@RequiredArgsConstructor
public enum ResponseCode {
    // 客户端异常
    NOT_FOUND(HttpStatus.NOT_FOUND.value(), "客户端请求资源未找到"),
    BAD_REQUEST(HttpStatus.BAD_REQUEST.value(), "客户端请求参数错误"),
    BAD_REQUEST_VALID(HttpStatus.BAD_REQUEST.value(), "客户端请求参数校验错误"),
    UNAUTHORIZED(HttpStatus.UNAUTHORIZED.value(), "请登录后访问此资源"),
    // 服务端异常

    INTERNAL_SERVER_ERROR(HttpStatus.INTERNAL_SERVER_ERROR.value(), "服务端处理错误"),
    // 正常请求
    OK(HttpStatus.OK.value(), "请求成功"),
    ;

    public final Integer code;
    public final String message;

}
